﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter11.Code02.Code01.Example04
{
    public class Demo
    {
        public static void Begin()
        {
            Checker check = new Checker();
            ClassA try1 = new ClassA();
            ClassB try2 = new ClassB();
            ClassC try3 = new ClassC();
            ClassD try4 = new ClassD();
            MyStruct try5 = new MyStruct();
            object try6 = try5;
            Console.WriteLine("Analyzing CalssA type variable:");
            check.Check(try1);
            Console.WriteLine("\nAnalyzing CalssB type variable:");
            check.Check(try2);
            Console.WriteLine("\nAnalyzing CalssC type variable:");
            check.Check(try3);
            Console.WriteLine("\nAnalyzing CalssD type variable:");
            check.Check(try4);
            Console.WriteLine("\nAnalyzing MyStruct type variable:");
            check.Check(try5);
            Console.WriteLine("\nAnalyzing boxed MyStruct type variable:");
            check.Check(try6);
            Console.ReadLine();
        }
    }
}
